﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using System.IO;
namespace UI
{
    public partial class bak : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string folder = Request["folder"];
            foreach (string f in Request.Files.AllKeys)
            {
                HttpPostedFile file = Request.Files[f];
                try
                {
                    if (!Directory.Exists(@"E:\bak\" + folder))
                    {
                        Directory.CreateDirectory(@"E:\bak\" + folder);
                    }
                    file.SaveAs(@"E:\bak\" + folder + @"\" +file.FileName);
                }
                catch (Exception ex)
                {
                    Commons.Log(ex.Message);
                }
            }
        }
    }
}